import React from 'react'
import { NavLink } from 'react-router-dom';
import styles from './index.module.less'
interface TypeList {
    lists: [{ id: string, pic: string, title: string }]
}
export default function Index(props: TypeList) {
    // console.log(props.lists);

    return (
        <>
            <div className={styles.listbox} >
                {
                    props.lists.map(item => <NavLink to={'/find/articleInfo?id=' + item.id} key={item.id} className={styles.listItem}>
                        <div className={styles.imgbox}>
                            <img style={{ width: '100%', height: '100%', objectFit: "cover" }} src={item.pic} alt="" />
                        </div>
                        <div className={styles.dddbox} style={{ width: '100%' }} ><div className={styles.titleboxs}>{item.title}</div></div>
                    </NavLink>)
                }

            </div>


        </>
    )
}
